#!/bin/bash

yum install docker -y

docker pull mysql

docker run -–name mysql8 -e MYSQL_ROOT_PASSWORD=beta56789 -idt -p 3306:3306 mysql:latest

# mysql -h 127.0.0.1 --port 3308 -u root -p

docker run --name mysql8docker -e MYSQL_ROOT_PASSWORD=alxxxx -idt -p 3306:3306 mysql

# 数据库里面要执行

# set global sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';

# set session sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';